]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
viewSelector: make the old page fade-out optional
authorCosimo Cecchi <cosimoc@gnome.org>
Sat, 16 Feb 2013 17:59:54 +0000 (12:59 -0500)
committerCosimo Cecchi <cosimoc@gnome.org>
Sat, 16 Feb 2013 18:26:38 +0000 (13:26 -0500)
When leaving the overview, we don't want the old page to fade out, but
we want to fade in the windows directly.

https://bugzilla.gnome.org/show_bug.cgi?id=693974

js/ui/viewSelector.js

index de9237bea402777d0fc2c16eda16e83a444ebaff..9a06c5c7663a19cc5c85a6d261d6a2668f426eab 100644 (file)
@@ -169,7 +169,7 @@ const ViewSelector = new Lang.Class({
         if (!this._workspacesDisplay.activeWorkspaceHasMaximizedWindows())
             Main.overview.fadeOutDesktop();
 
-        this._showPage(this._workspacesPage);
+        this._showPage(this._workspacesPage, true);
     },
 
     zoomFromOverview: function() {
@@ -205,7 +205,10 @@ const ViewSelector = new Lang.Class({
         return page;
     },
 
-    _fadePageIn: function() {
+    _fadePageIn: function(oldPage) {
+        if (oldPage)
+            oldPage.hide();
+
         this.emit('page-empty');
 
         this._activePage.show();
@@ -216,7 +219,7 @@ const ViewSelector = new Lang.Class({
             });
     },
 
-    _showPage: function(page) {
+    _showPage: function(page, noFade) {
         if (page == this._activePage)
             return;
 
@@ -224,19 +227,18 @@ const ViewSelector = new Lang.Class({
         this._activePage = page;
         this.emit('page-changed');
 
-        if (oldPage)
+        if (oldPage && !noFade)
             Tweener.addTween(oldPage,
                              { opacity: 0,
                                time: OverviewControls.SIDE_CONTROLS_ANIMATION_TIME / 2,
                                transition: 'easeOutQuad',
                                onComplete: Lang.bind(this,
                                    function() {
-                                       oldPage.hide();
-                                       this._fadePageIn();
+                                       this._fadePageIn(oldPage);
                                    })
                              });
         else
-            this._fadePageIn();
+            this._fadePageIn(oldPage);
     },
 
     _a11yFocusPage: function(page) {